package net.butfly.bus.exception;

public class BusRuntimeException extends RuntimeException {

	private static final long serialVersionUID = -7617925338905953846L;

	private String errorCode;

	private String message;

	private Throwable cause;

	public BusRuntimeException(String code) {
		super();
		errorCode = code;
	}

	public BusRuntimeException(String code, String message) {
		super();
		this.message = message;
		this.errorCode = code;
	}

	public BusRuntimeException(String code, Throwable cause) {
		super();
		this.errorCode = code;
		this.cause = cause;
	}

	public BusRuntimeException(String code, String message, Throwable cause) {
		this(code, message);
		this.cause = cause;
	}

	public String getCode() {
		return this.errorCode;
	}

	public Throwable getCause() {
		return this.cause;
	}

	public String getMessage() {
		return this.message;
	}

	public void setCause(Throwable cause) {
		this.cause = cause;
	}

}
